﻿using System;
using System.Collections.Generic;
using OpenTwitter.SDK.Tencent.API;
using OpenTwitter.SDK.Tencent;
using OpenTwitter.SDK.Tencent.Objects;
using OpenTwitter.SDK;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Xml;
using System.IO;
using WaterMark;
using System.Net;

namespace guanggun.guanggun
{
    public partial class cs : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            string path = Server.MapPath("\\images\\guanggun4.gif");
            string pathnew = Server.MapPath("\\temp\\") +DateTime.Now.Ticks.ToString() + ".jpg";
            string head="http://t1.qlogo.cn/mbloghead/b1852ff1d673478072da/100";
            if (head.StartsWith("http"))
            {
                WebClient wc = new WebClient();
                string headloacl = Server.MapPath("\\head\\") + DateTime.Now.Ticks.ToString() + ".jpg";
                wc.DownloadFile(new Uri( head),headloacl );
                head=headloacl;
            }
            WaterMark.WaterMark wm = new WaterMark.WaterMark("邵辉", "帅哥", "23", head, path,pathnew);
            wm.maker();
        }

    }
}